<template>
    <main>
        <div class="affiliate-banner">
            <div class="affiliate-banner-title">{{$t('affiliate_banner_title')}}</div>
            <div class="affiliate-banner-description">{{$t('affiliate_banner_desc')}} <strong>100%</strong></div>
            <div class="affiliate-banner-button-container"><a href="#submit" class="affiliate-banner-button">{{$t('affiliate_banner_button')}}</a>
            </div>
        </div>
        <div class="affiliate-subtitle">为什么加入 Malus 推荐计划？</div>

        <div class="malus-container container">
            <div class="affiliate-service-card row">
                <div class="col-lg-3 col-12 justify-content-center align-items-center" v-for="(item, key) in serviceCard"
                     :key="key">
                    <div class="affiliate-service-card-content"><img
                        :src="item.path"
                        alt="5 stars product">
                        <div class="affiliate-service-card-content-title">{{ item.title }}</div>
                        <div class="affiliate-service-card-content-description">Malus
                            {{ item.desc }}
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="affiliate-subtitle affiliate-subtitle-benefit">可获得佣金返现率高达100%</div>

        <div class="container affiliate-table-container">
            <div class="table">
                <div class="table-head"><span>购买时长</span> <span class="green"><strong>新购用户返现率</strong></span> <span
                    class="orange"><strong>续费用户返现率</strong></span></div>
                <div class="table-row"><span>30天</span> <span>100%</span> <span>50%</span></div>
                <div class="table-row"><span>90天</span> <span>40%</span> <span>30%</span></div>
                <div class="table-row"><span>180天</span> <span>30%</span> <span>20%</span></div>
                <div class="table-row"><span>360天</span> <span>20%</span> <span>10%</span></div>
                <div class="table-row"><span>720天</span> <span>10%</span> <span>8%</span></div>
                <div class="table-row"><span>1080天</span> <span>8%</span> <span>5%</span></div>
            </div>
            <div class="affiliate-rate-top"><span>当月用户最高创收(美元)</span> <span>$2318</span> <span>无上限，邀请用户越多获利越多</span> <a
                href="#submit">立即赚取佣金</a></div>
        </div>

        <div class="affiliate-subtitle">简单 3 步，立即赚取佣金</div>

        <div class="container affiliate-step-container">
            <div class="row">
                <div class="col-lg-4" v-for="(item, key) in affiliateStep" :key="key">
                    <div class="affiliate-step"><img :src="item.path" alt="">
                        <div><span>{{ item.title }}</span> <span>{{ item.desc }}</span></div>
                    </div>
                </div>
            </div>
        </div>

        <div class="affiliate-submit">
            <div class="affiliate-form-container">
                <div class="affiliate-subtitle submit-subtitle">立即申请返现计划</div>
                <div class="form">
                    <div class="form-group" id="submit"><span class="label">申请邮箱 <strong class="red">*</strong><span
                        id="email-err" class="error"></span></span> <input type="text" id="email" placeholder="请输入申请邮箱">
                    </div>
                    <div class="form-group"><span class="label">推广网址和相关信息 <strong class="red">*</strong> <span
                        id="info-err" class="error"></span></span> <textarea name=""
                                                                             placeholder="如果是自媒体请提交自媒体的渠道和名称，以便我们尽快审核你的请求"
                                                                             id="info" cols="30" rows="10"></textarea>
                    </div>
                    <div class="form-group aff-privacy"><img :src="checkPath" alt=""> <span>我已阅读并接受 </span><a
                        href="/terms" target="_blank">Malus协议条款</a></div>
                    <div class="form-group">
                        <div id="submit-affiliate" class="btn">提交申请</div>
                    </div>
                </div>
            </div>
        </div>
    </main>
</template>

<script>
export default {
    name: "Affiliate",
    data() {
        return {
            serviceCard: [
                {
                    title: '5星好评产品',
                    desc: 'Malus 上线以来已为百万海外用户提供回国影音和游戏加速服务，产品稳定快速，得到用户的一致好评',
                    path: require('@/assets/ic_80_market.73fe7.png')
                },
                {
                    title: '返现率高达100%',
                    desc: '被推荐者首次购买30天，享高达100%返现率，业界高水准，让你的每一笔推荐变得有价值',
                    path: require('@/assets/ic_80_rate.1eaaf.png')
                },
                {
                    title: '智慧平台，实时追踪',
                    desc: 'Malus返现平台，提供订单实时追踪，确保被推荐者成功购买每一笔订单都能及时返现',
                    path: require('@/assets/ic_80_search.82468.png')
                },
                {
                    title: '专享 VIP 服务',
                    desc: '如果您有任何疑问，只需点击页面右下角沟通按钮，我们将第一时间为您提供解答',
                    path: require('@/assets/ic_80_vip.561a2.png')
                }
            ],
            affiliateStep: [
                {
                    title: '申请推荐大使',
                    desc: '填写基本信息，等待审核通过',
                    path: require('@/assets/ic_step_1.0aeb1.png')
                },
                {
                    title: '获取分享链接',
                    desc: '获取固定的链接，宣传资料',
                    path: require('@/assets/ic_step_2.3df0a.png')
                },
                {
                    title: '提取返现佣金',
                    desc: '每月提取邀请用户购买所得的佣金',
                    path: require('@/assets/ic_step_3.ceefc.png')
                },
            ],
            checkPath: require('@/assets/ic_affiliate_check.e95f3.png')
        }
    }
}
</script>

<style scoped lang="scss">
@media (max-width: 767.98px) {
    .affiliate-banner {
        padding: 0 25px;
        height: auto;
        .affiliate-banner-title {
            font-size: 42px!important;
        }
    }
    .affiliate-subtitle {
        padding: 0 35px;
        margin-bottom: 128px;
        height: auto!important;
        font-size: 36px;
    }
    .affiliate-service-card {
        margin: 32px 0 0 0!important;
    }
    .affiliate-service-card-content {
        width: 100%!important;
        margin-bottom: 108px;
    }
    .affiliate-table-container {
        flex-direction: column!important;
        .table {
            width: 100%!important;
        }
        .affiliate-rate-top {
            margin-top: 48px;
            display: flex;
            height: 300px;
        }
    }
    .affiliate-step {
        margin-left: 25px;
        img {
            width: 64px!important;
            height: 100%!important;
        }
        span:nth-child(1) {
            font-size: 18px!important;
        }
    }
    .affiliate-form-container {
        width: 100%;
    }
    .form {
        width: 100%!important;
        margin: 0 auto 80px;
        padding: 48px 15px!important;
        flex-direction: column!important;
        flex-wrap: nowrap!important;
        border-radius: 0!important;
        .form-group {
            width: 100%!important;
        }
    }
}
main {
    .affiliate-banner {
        background: url(../assets/bg_affiliate_banner.72403.png) no-repeat;
        background-size: cover;
        height: 500px;
        display: flex;
        justify-content: center;
        flex-direction: column;

        .affiliate-banner-title {
            font-size: 48px;
            line-height: normal;
            text-align: center;
            color: #fff;
        }

        .affiliate-banner-description {
            font-size: 20px;
            line-height: 34px;
            text-align: center;
            color: #fff;
            margin-top: 16px;

            strong {
                font-weight: bolder;
            }
        }

        .affiliate-banner-button-container {
            margin: 40px auto 0;

            a {
                display: block;
                width: 226px;
                height: 47px;
                background: #ff960c;
                box-shadow: 0 16px 32px rgb(0 0 0 / 10%);
                border-radius: 6px;
                font-size: 16px;
                color: #fff;
                font-weight: 500;
                line-height: 47px;
                text-align: center;
                border: none;
                transition: all .2s ease;
            }

            a:hover {
                transform: translateY(-4px);
            }
        }
    }

    .affiliate-subtitle {
        height: 61px;
        display: block;
        margin: 100px auto 76px;
        font-size: 36px;
        line-height: 60px;
        text-align: center;
        color: #000;
    }

    .malus-container {
        display: flex;
        justify-content: space-between;
        flex-direction: row;

        .affiliate-service-card {
            width: 100%;
            margin-top: 32px;

            .affiliate-service-card-content {
                display: flex;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                width: 264px;
                border: 1px solid #f0f1ff;
                border-radius: 6px;

                img {
                    width: 80px;
                    height: 80px;
                    margin-top: -40px;
                }

                .affiliate-service-card-content-title {
                    font-size: 18px;
                    line-height: 30px;
                    text-align: center;
                    margin-top: 24px;
                    color: #000;
                    font-weight: 500;
                }

                .affiliate-service-card-content-description {
                    font-size: 13px;
                    line-height: 22px;
                    padding: 0 24px;
                    text-align: center;
                    color: #7b7b7b;
                    margin: 16px 0 41px;
                }
            }
        }
    }

    .affiliate-table-container {
        display: flex;
        justify-content: space-between;
        flex-direction: row;

        .table {
            display: flex;
            flex-flow: column;
            justify-content: center;
            width: 848px;
            border-left: solid 1px #e8e7f8;
            border-top: solid 1px #e8e7f8;

            .table-head {
                display: flex;
                flex-direction: row;
                justify-content: center;

                span {
                    width: 33.3%;
                    height: 60px;
                    background: #fff;
                    text-align: center;
                    line-height: 60px;
                    border-right: solid 1px #e8e7f8;
                    border-bottom: solid 1px #e8e7f8;
                }

                .green {
                    font-weight: 700;
                    color: #07bb07 !important;

                    strong {
                        font-weight: bolder;
                    }
                }

                .orange {
                    font-weight: 700;
                    color: #ff960c !important;

                    strong {
                        font-weight: bolder;
                    }
                }
            }

            .table-row {
                display: flex;
                flex-direction: row;
                justify-content: center;

                span {
                    width: 33.3%;
                    height: 60px;
                    background: #fff;
                    text-align: center;
                    line-height: 60px;
                    border-right: solid 1px #e8e7f8;
                    border-bottom: solid 1px #e8e7f8;
                }

                span:nth-child(2), span:nth-child(3) {
                    font-weight: 700;
                    color: #333;
                }
            }
        }

        .affiliate-rate-top {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: url(../assets/ic_affiliate_rate.4d58c.png);
            padding: 0 40px;

            span:nth-child(1) {
                font-size: 16px;
                line-height: 27px;
                text-align: center;
                color: #fff;
                font-weight: 500;
            }

            span:nth-child(2) {
                margin-top: 16px;
                background: rgba(2, 2, 2, .1);
                border-radius: 6px;
                font-size: 40px;
                font-weight: 700;
                line-height: normal;
                text-align: center;
                letter-spacing: 7px;
                color: #fff;
                width: 184px;
                height: 64px;
                display: flex;
                justify-content: center;
                align-items: center;
            }

            span:nth-child(3) {
                font-size: 12px;
                line-height: 20px;
                text-align: center;
                color: #fff;
                margin-top: 16px;
                font-weight: 500;
            }

            a {
                width: 184px;
                height: 46px;
                display: flex;
                justify-content: center;
                align-items: center;
                border: 2px solid #fff;
                border-radius: 6px;
                font-size: 14px;
                color: #fff;
                margin-top: 40px;
                font-weight: 700;
                transition: all .2s ease;
            }

            a:hover {
                background: rgba(255, 255, 255, .1);
            }
        }
    }

    .affiliate-step-container {
        .row {
            width: 100%;

            .affiliate-step {
                display: flex;
                flex-direction: row;

                img {
                    width: 82px;
                    height: 169px;
                    margin-right: 16px;
                }

                div {
                    display: flex;
                    flex-direction: column;
                    justify-content: center;

                    span:nth-child(1) {
                        font-size: 24px;
                        line-height: normal;
                        color: #000;
                    }

                    span:nth-child(2) {
                        font-size: 14px;
                        line-height: 24px;
                        color: #7b7b7b;
                        padding-top: 6px;
                    }
                }
            }
        }
    }

    .affiliate-submit {
        background: url(../assets/bg_affiliate_submit.60cb1.png);
        align-items: center;
        margin-top: 100px;
        background-size: cover;
        flex-direction: column;
        display: flex;
        .affiliate-form-container {
            .submit-subtitle {
                color: #fff;
                margin: 70px auto 42px;
                height: 61px;
                display: block;
                font-size: 36px;
                line-height: 60px;
                text-align: center;
            }
            .form {
                width: 950px;
                background: #fff;
                flex-wrap: wrap;
                justify-content: space-around;
                display: flex;
                flex-direction: column;
                margin-bottom: 100px;
                border-radius: 6px;
                border: 1px solid rgba(0,0,0,.05);
                padding: 64px 98px 40px;
                align-items: center;
                .form-group {
                    display: flex;
                    width: 356px;
                    margin-bottom: 30px;
                    flex-direction: column;
                    .label {
                        margin-bottom: 12px;
                        font-size: 14px;
                        line-height: 18px;
                        color: #000;
                        display: flex;
                        align-items: center;
                        .red {
                            color: #ff5569;
                        }
                    }
                    input {
                        font-size: 12px;
                        height: 46px;
                        background: #fff;
                        border: 1px solid #c9c6f7;
                        border-radius: 4px;
                        padding: 14px 0 14px 12px;
                        -moz-appearance: none;
                        -webkit-appearance: none;
                        appearance: none;
                        transition: all .2s ease;
                    }
                    textarea {
                        width: 100%;
                        border: 1px solid #c9c6f7;
                        resize: none;
                        border-radius: 4px;
                        padding: 12px;
                        color: #7b7b7b;
                        font-size: 12px;
                        height: 120px;
                        outline: 0;
                    }
                }
                .aff-privacy {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    font-size: 12px;
                    line-height: 18px;
                    color: #000;
                    width: 362px;
                    justify-content: flex-start;
                    img {
                        width: 16px;
                        height: 16px;
                        margin-right: 5px;
                    }
                    span {
                        margin-right: 5px;
                    }
                }
                .btn {
                    width: 356px;
                    height: 50px;
                    background: #ff960c;
                    font-size: 16px;
                    line-height: 50px;
                    border-radius: 6px;
                    text-align: center;
                    color: #fff;
                    cursor: pointer;
                    font-weight: 700;
                    transition: all .2s ease;
                    padding: 0;
                }
                .btn:hover {
                    background: #ec8907;
                }
            }
        }
    }
}
</style>
